﻿using Azylee.Core.IOUtils.TxtUtils;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using JustMetClient.Models.ConfigModels;

namespace JustMetClient.Commons
{
    public static partial class R
    {
        public static class Config
        {

            internal static List<WebConfigModel> WebConfigs = new List<WebConfigModel>();

            #region Web 服务器
            internal static string WEB_IP
            {
                get { return ConfigTool.Get("SERVER_WEB_IP"); }
            }
            internal static string WEB_PORT
            {
                get { return ConfigTool.Get("SERVER_WEB_PORT"); }
            }
            internal static string WEB_CONFIG_API
            {
                get { return ConfigTool.Get("WEB_CONFIG_API"); }
            }
            #endregion

            #region Socket 服务器
            internal static string SOCKET_IP
            {
                get { return ConfigTool.Get("SERVER_SOCKET_IP"); }
            }
            internal static int SOCKET_PORT
            {
                get { return ConfigTool.GetInt("SERVER_SOCKET_PORT"); }
            }
            #endregion

            #region FTP 服务器
            internal static string FTP_IP
            {
                get { return ConfigTool.Get("SERVER_FTP_IP"); }
            }
            internal static string FTP_ACCOUNT
            {
                get { return ConfigTool.Get("SERVER_FTP_ACCOUNT"); }
            }
            internal static string FTP_PASSWORD
            {
                get { return ConfigTool.Get("SERVER_FTP_PASSWORD"); }
            }
            #endregion

            #region 外网 Web 服务器
            internal static string INTERNET_IP
            {
                get { return ConfigTool.Get("INTERNET_WEB_IP"); }
            }
            internal static string INTERNET_PORT
            {
                get { return ConfigTool.Get("INTERNET_WEB_PORT"); }
            }
            #endregion

            #region IMOS 服务器
            internal static string IMOS_API { get { return ConfigTool.Get("IMOS_Server_API"); } }
            #endregion

            #region 更新功能配置文件
            internal static string ASVersionPath
            {
                get { return ConfigTool.Get("JustMetClient_Version_Path"); }
            }
            internal static string ASVersionFile
            {
                get { return ConfigTool.Get("JustMetClient_Version_File"); }
            }
            internal static string ASDistributionPath
            {
                get { return ConfigTool.Get("JustMetClient_Distribution_Path"); }
            }
            #endregion
        }
    }
}